function template(id, data) {
				let code = document.getElementById(id).innerHTML;
				
				code = code.replace( /<%=(.+)%>/g, "`) \n print($1) \n print(`" );
				code = "print(`" + code + "`)";
				code = code.replace( /<%/g , "`) \n" );
				code = code.replace( /%>/g , " \n print(`" )
				
				code = `(function(data){
					let htmlstr = "";
					function print(val) {
						htmlstr += val;
					}
					${code}
					
					return htmlstr;
				})
				`;
				let fun = eval(code);
				return fun(data);
			}
